package org.icy.core.installation;

import org.ice.db.Table;

public class InstallModel extends Table {
	
	@Override
	public void setupAdapter() {
		super.setupAdapter();
		adapter.setAutoCommit(false);
	}

	public void runQuery(String query) throws Exception {
		String[] queries = query.split(";");
		this.startBatch();
		for(String q: queries) {
			q = q.trim();
			if (!q.isEmpty())
				this.addBatch(q);
		}
		this.batchUpdate();
	}
}
